package com.xzlf.job.spring;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
@Slf4j
public class TaskUtil {

//    @Scheduled(cron = "*/10 * * * * ?") // cron表达式每10s 执行一次
    public void doTask(){
      log.info("我是定时任务：{}", new Date());
    }
}
